package club.fuwenhao;


import club.fuwenhao.handler.FwhNettyClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import java.io.IOException;

/**
 * @author fwh
 * @date 2021-10-28 10:14 2021-10-28 12:17
 */
@Slf4j
@SpringBootApplication
public class FwhNettyClientApplication {

    public static void main(String[] args) {
        SpringApplication.run(FwhNettyClientApplication.class, args);
        log.info("FwhNettyClientApplication is start");
    }

    /**
     * 客户端Netty初始化
     *
     * @return
     * @throws IOException
     * @throws InterruptedException
     */
    @Bean
    public void init() throws IOException, InterruptedException {
        //启动-注册发送消息
        new FwhNettyClient().init();
    }

}
